#ifndef  H_A2CRYPT
#define  H_A2CRYPT

#ifndef H_A2DIO
# include "a2dio.h"
#endif

#ifdef __cplusplus
 extern "C" {
#endif

A2EXT void A2PAS a2SetPswFunc(
   int (A2CALLBACK *pswf)(char *fnm, char *psw, int mlen)
);

#if !defined(H_A2NIKA) || !(defined(__FOR_WINDOWS__) || defined(__FOR_WIN32__))

/*--------------*/
/* a2g28147.asm */
/*--------------*/
enum { a2cpu8086=0, a2cpu286=2, a2cpu386=3 };
short A2getCPU (void); /*486... == a2cpu386*/
void A2crypSetKey  (char *buf, unsigned len);
#define A2_GET_KEY 0x1717
void A2crypSetChg  (char *buf);
void A2encrypChild (char *buf, unsigned len);
void A2decrypChild (char *buf, unsigned len);
void A2encrypSimple(char *buf, unsigned len);
void A2decrypSimple(char *buf, unsigned len);
void A2crypGamma   (char *buf, unsigned len, long sync[2]);
#define A2encrypGamma A2crypGamma
#define A2decrypGamma A2crypGamma
void A2encrypGammaB(char *buf, unsigned len, long sync[2]);
void A2decrypGammaB(char *buf, unsigned len, long sync[2]);
long A2crypImito   (char *buf, unsigned len);

/*-----------*/
/* a2crypt.c */
/*-----------*/
int  A2checkPSW (PDAFILE pda,char *crypPSW,char *psw, int defpsw);
int  A2linkCryptography(void);

/*------------*/
/* a2crypt1.c */
/*------------*/
int A2encrypFile(char *srcfile, char *dstfile, char *psw);
int A2decrypFile(char *srcfile, char *dstfile, char *psw);

#endif /* !(H_A2NIKA) || !(__FOR_WINDOWS__ || __FOR_WIN32__) */

#ifdef __cplusplus
 }
#endif

#endif /*H_A2CRYPT*/

